<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:view>
	<h:head>
		<title>#{messages.appTitle}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<h:outputStylesheet name="css/style.css" />
		<link rel="shortcut icon" type="image/x-icon" href="#{request.contextPath}/resources/images/favicon.ico"/>
	</h:head>
	<h:body>
		<div id="header">
			<div class="header_content">
				<h:graphicImage value="/resources/images/logo.gif"
					height="60" width="57"/>			
			</div>
		</div>
		<div id="sub_header">
		</div>
		<div id="content">
			<div class="ruta">
			</div>
			
			<div class="menu">
			</div>
			
			<div class="content_right">
				<p class="titol_content">#{messages.loginTitle}</p>
				<div class="message">
			        <c:if test="#{param.login_error == 1 and SPRING_SECURITY_LAST_EXCEPTION != null}">
			            <span class="error">#{SPRING_SECURITY_LAST_EXCEPTION.message}</span>
			        </c:if>
			    </div>
			
			    <div class="login">
			        <form action="j_spring_security_check" method="post">
			            <h:panelGrid columns="2">
			                <h:outputLabel styleClass="labelLogin" value="#{messages.loginUsername}:" for="j_username" />
			                <h:inputText id="j_username" autocomplete="off" />
			                <h:outputLabel styleClass="labelLogin" value="#{messages.loginPassword}:" for="j_password" />
			                <h:inputSecret id="j_password" autocomplete="off" />
			            </h:panelGrid>

			
			            <div class="submit">
			                <button type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
			                    <span class="ui-button-text">
			                    	<h:outputText value="#{messages.loginSubmit}" />
			                    </span>
			                </button>
			            </div>
			        </form>
			        <h:form>
			        	<h:commandLink action="//change-password.xhtml?faces-redirect=true" 
							value="#{messages.changePasswordTitle}"
							immediate="true"/>
			        </h:form>
			    </div>
			</div>
		</div>
		
		<div class="clearer"></div>
	
		<div id="footer">
			<div class="footer_content">
				<div class="footer_content_left">
				<p class="footer_titol">#{messages.footerText}</p>
				</div>	
				<div class="footer_content_center">
				<p class="footer">#{messages.footerCenter}</p>
				</div>	
				<div class="footer_content_right">
				<p class="footer">
					<h:link styleClass="neta" outcome="/legal.xhtml" value="#{messages.footerLegal}"/> | <h:link styleClass="neta" outcome="/contacto.xhtml" value="#{messages.footerContacto}"/></p>
				</div>			
			</div>
		</div>
	</h:body>
</f:view>
</html>